package com.project.server.service.estates.impl;

import java.util.List;

import com.project.common.core.domain.BaseServer;
import com.project.common.utils.DateUtils;
import com.project.server.domain.estates.TEstatesTask;
import com.project.server.mapper.estates.TEstatesTaskMapper;
import com.project.server.service.estates.ITEstatesTaskService;
import org.mybatis.logging.Logger;
import org.mybatis.logging.LoggerFactory;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

/**
 * 物业管理运维任务Service业务层处理
 *
 * @author project
 * @date 2021-06-28
 */
@Service
public class TEstatesTaskServiceImpl extends BaseServer implements ITEstatesTaskService {

    private static final Logger log = LoggerFactory.getLogger(TEstatesTaskServiceImpl.class);

    @Resource
    private TEstatesTaskMapper tEstatesTaskMapper;

    /**
     * 查询物业管理运维任务
     *
     * @param taskId 物业管理运维任务ID
     * @return 物业管理运维任务
     */
    @Override
    public TEstatesTask selectTEstatesTaskById(Long taskId) {
        return tEstatesTaskMapper.selectTEstatesTaskById(taskId);
    }

    /**
     * 查询物业管理运维任务列表
     *
     * @param tEstatesTask 物业管理运维任务
     * @return 物业管理运维任务
     */
    @Override
    public List<TEstatesTask> selectTEstatesTaskList(TEstatesTask tEstatesTask) {
        return tEstatesTaskMapper.selectTEstatesTaskList(tEstatesTask);
    }

    /**
     * 新增物业管理运维任务
     *
     * @param tEstatesTask 物业管理运维任务
     * @return 结果
     */
    @Override
    public int insertTEstatesTask(TEstatesTask tEstatesTask) {
        super.insert(tEstatesTask);
        return tEstatesTaskMapper.insertTEstatesTask(tEstatesTask);
    }

    /**
     * 修改物业管理运维任务
     *
     * @param tEstatesTask 物业管理运维任务
     * @return 结果
     */
    @Override
    public int updateTEstatesTask(TEstatesTask tEstatesTask) {
        super.update(tEstatesTask);
        return tEstatesTaskMapper.updateTEstatesTask(tEstatesTask);
    }

    /**
     * 批量删除物业管理运维任务
     *
     * @param taskIds 需要删除的物业管理运维任务ID
     * @return 结果
     */
    @Override
    public int deleteTEstatesTaskByIds(Long[] taskIds) {
        return tEstatesTaskMapper.deleteTEstatesTaskByIds(taskIds);
    }

    /**
     * 删除物业管理运维任务信息
     *
     * @param taskId 物业管理运维任务ID
     * @return 结果
     */
    @Override
    public int deleteTEstatesTaskById(Long taskId) {
        return tEstatesTaskMapper.deleteTEstatesTaskById(taskId);
    }
}
